Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor env:link, add tests #2587

Conversation

khamilowicz
Copy link
Contributor

@khamilowicz khamilowicz commented Sep 20, 2024

Why

ENG-13525: Update EAS-CLI for new EnvVar features

Add tests, polish the interface

How

  • Use variable-name and variable-environment to select the variable
  • More robust selector of variable to remove ambiguity
  • Use multiselect to clearly indicate which environments are linked and which are not
  • Automatic link and unlink action

All commands that were using name parameter to identify a single variable will use variable-name and variable-environment instead. This change will enable user to distinguish between name and environment that is identifying variable that is acted upon, and name and environment that is a parameter for command.

For example, when the user wants to update variable TEST that has environment production and change its name and change its environment, they can use:

eas env:update --variable-name TEST --variable-environment production --name TEST-update --environment production --environment preview

Test Plan

Added tests

Copy link

linear bot commented Sep 20, 2024

Copy link

github-actions bot commented Sep 20, 2024

Size Change: -1.56 kB (0%)

Total Size: 52.9 MB

Filename Size Change
./packages/eas-cli/dist/eas-linux-x64.tar.gz 52.9 MB -1.56 kB (0%)

compressed-size-action

@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split branch from 7dacc37 to 8351549 Compare September 20, 2024 11:33
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split_split branch from 0fa04cc to 4b67f55 Compare September 20, 2024 11:33
@khamilowicz khamilowicz added the no changelog PR that doesn't require a changelog entry label Sep 20, 2024 — with Graphite App
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split branch from 8351549 to 686de52 Compare September 20, 2024 15:35
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split_split branch from 4b67f55 to 408e636 Compare September 20, 2024 15:35
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split branch from 686de52 to cf96d31 Compare September 20, 2024 16:11
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split_split branch from 408e636 to d330899 Compare September 20, 2024 16:11
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split branch from cf96d31 to d23bd96 Compare September 20, 2024 16:54
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split_split branch from d330899 to 757bc07 Compare September 20, 2024 16:54
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split branch from d23bd96 to f3e7c08 Compare September 20, 2024 17:03
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split_split branch from 757bc07 to 0671f67 Compare September 20, 2024 17:03
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split branch from f3e7c08 to e039833 Compare September 20, 2024 17:16
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split_split branch 2 times, most recently from 5cb484a to e46bfcb Compare September 20, 2024 17:27
Copy link

codecov bot commented Sep 20, 2024

Codecov Report

Attention: Patch coverage is 93.75000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 52.87%. Comparing base (37a68c5) to head (983f38c).
Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
packages/eas-cli/src/commands/env/link.ts 93.75% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2587      +/-   ##
==========================================
+ Coverage   51.87%   52.87%   +1.01%     
==========================================
  Files         563      563              
  Lines       21303    21376      +73     
  Branches     4348     4380      +32     
==========================================
+ Hits        11049    11301     +252     
+ Misses       9366     9231     -135     
+ Partials      888      844      -44     
Flag Coverage Δ
52.87% <93.75%> (+1.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split branch from e039833 to b34acbb Compare September 23, 2024 09:26
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split branch from 3b540ac to 16a0fe8 Compare September 23, 2024 10:37
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split_split branch from f686743 to 1722d85 Compare September 23, 2024 10:37
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split branch from 16a0fe8 to 076b630 Compare September 23, 2024 13:01
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split_split branch from 1722d85 to a23e973 Compare September 23, 2024 13:01
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split branch from 076b630 to ef1335b Compare September 23, 2024 13:19
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split_split branch from a23e973 to 3b567f3 Compare September 23, 2024 13:20
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split branch from ef1335b to 855b3ce Compare September 24, 2024 10:16
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split_split branch from 3b567f3 to 2ebaad6 Compare September 24, 2024 10:16
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split branch from 855b3ce to e3dfd4d Compare September 24, 2024 11:06
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split_split branch from 2ebaad6 to 993ded4 Compare September 24, 2024 11:06
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split branch from e3dfd4d to e8b7509 Compare September 24, 2024 11:13
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split_split branch from 993ded4 to dfbdef7 Compare September 24, 2024 11:14
@khamilowicz khamilowicz marked this pull request as ready for review September 25, 2024 12:32
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split branch from e8b7509 to 4311ded Compare September 27, 2024 10:18
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split_split branch from dfbdef7 to a367357 Compare September 27, 2024 10:18
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split branch from 4311ded to b4d4ac6 Compare September 27, 2024 10:30
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split_split branch from a367357 to 47b7ca8 Compare September 27, 2024 10:30
Copy link
Contributor Author

khamilowicz commented Oct 1, 2024

Merge activity

  • Oct 1, 4:35 AM EDT: @khamilowicz started a stack merge that includes this pull request via Graphite.
  • Oct 1, 4:56 AM EDT: Graphite rebased this pull request as part of a merge.
  • Oct 1, 4:57 AM EDT: @khamilowicz merged this pull request with Graphite.

@khamilowicz khamilowicz changed the base branch from piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split to graphite-base/2587 October 1, 2024 08:52
@khamilowicz khamilowicz changed the base branch from graphite-base/2587 to main October 1, 2024 08:54
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split_split branch from 47b7ca8 to 983f38c Compare October 1, 2024 08:55
Copy link

github-actions bot commented Oct 1, 2024

⏩ The changelog entry check has been skipped since the "no changelog" label is present.

Copy link

github-actions bot commented Oct 1, 2024

CodeMention:

File Patterns Mentions
**/* @szdziedzic, @khamilowicz, @sjchmiela

@khamilowicz khamilowicz merged commit 0d384d1 into main Oct 1, 2024
7 checks passed
@khamilowicz khamilowicz deleted the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split_split branch October 1, 2024 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no changelog PR that doesn't require a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants